﻿Namespace EIB
    Public NotInheritable Class BusAccess
        Public Shared SimulatorName As String = "Simulator"
        Public Shared KNXNetIPRouting As String = "Routing"
        Public Shared KNXNetIPTunnling As String = "Tunnling"


        Public Shared Function GetConnectionPorts() As List(Of ConnectionPort)
            Dim ports As New List(Of ConnectionPort)

            'Scan for Serial ports
            For Each portName In IO.Ports.SerialPort.GetPortNames.Reverse
                ports.Add(New ConnectionPort(portName, ConnectionPortCategory.BCU2_PEI10_FT12))
            Next
            ports.Add(New ConnectionPort(SimulatorName, ConnectionPortCategory.BCU2_PEI10_FT12))


            'Scan for USB devices
            'ports.Add(New ConnectionPort("USB", ConnectionPortCategory.USB))


            'KNXNet/IP
            'ports.Add(New ConnectionPort(KNXNetIPRouting, ConnectionPortCategory.KNXNETIP))
            'l.Add(New ConnectionPort(KNXNetIPTunnling, ConnectionPortCategory.KNXNETIP))
            'l.Add(New ConnectionPort(SimulatorName, ConnectionPortCategory.KNXNETIP))


            Return ports
        End Function
    End Class
End Namespace